package com.sky.service;

import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

public interface OrderService {

    /**
     * @MethodName: submitOrder
     * @Author 冰白寒祭
     * @Description: 用户下单
     * @Date: 2023-09-05 14:02:32
     * @param: OrdersSubmitDTO ordersSubmitDTO
     * @return: OrderSubmitVO
     */

    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 用户端订单分页查询
     *
     * @param page
     * @param pageSize
     * @param status
     * @return
     */
    PageResult pageQuery4User(int page, int pageSize, Integer status);

    /**
     * @MethodName: details
     * @Author 冰白寒祭
     * @Description: 查询订单详情
     * @Date: 2023-09-05 20:23:32
     * @param: Long id
     * @return: OrderVO
     */
    OrderVO details(Long id);

    /**
     * @MethodName: userCancelById
     * @Author 冰白寒祭
     * @Description: 用户取消订单
     * @Date: 2023-09-05 20:26:01
     * @param: Long id
     */
    void userCancelById(Long id) throws Exception;

    /**
     * @MethodName: repetition
     * @Author 冰白寒祭
     * @Description: 再来一单
     * @Date: 2023-09-05 20:35:29
    */
    void repetition(Long id);

    /**
     * @MethodName: conditionSearch
     * @Author 冰白寒祭
     * @Description: 条件搜索订单
     * @Date: 2023-09-05 20:40:54
     * @param: OrdersPageQueryDTO ordersPageQueryDTO
    * @return: PageResult
    */

    PageResult conditionSearch(OrdersPageQueryDTO ordersPageQueryDTO);

    /**
     * @MethodName: statistics
     * @Author 冰白寒祭
     * @Description: 各个状态的订单数量统计
     * @Date: 2023-09-05 20:43:52
    */
    OrderStatisticsVO statistics();

    /**
     * @MethodName: confirm
     * @Author 冰白寒祭
     * @Description: 接单
     * @Date: 2023-09-05 20:46:33
    */
    void confirm(OrdersConfirmDTO ordersConfirmDTO);

    /**
     * @MethodName: rejection
     * @Author 冰白寒祭
     * @Description: 拒单
     * @Date: 2023-09-05 20:48:42
    */
    void rejection(OrdersRejectionDTO ordersRejectionDTO) throws Exception;

    /**
     * @MethodName: cancel
     * @Author 冰白寒祭
     * @Description: 取消订单
     * @Date: 2023-09-05 20:56:42
     * @param: OrdersCancelDTO ordersCancelDTO
    */

    void cancel(OrdersCancelDTO ordersCancelDTO) throws Exception;

    /**
     * @MethodName: delivery
     * @Author 冰白寒祭
     * @Description: 派送订单
     * @Date: 2023-09-05 20:58:58
     * @param: Long id
     * @return: Result
    */

    void delivery(Long id);

    /**
     * @MethodName: complete
     * @Author 冰白寒祭
     * @Description: 完成订单
     * @Date: 2023-09-05 21:00:57
     * @param: Long id
     *@return: Result
    */
    void complete(Long id);

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    /**
     * @MethodName: reminder
     * @Author 冰白寒祭
     * @Description: 客户催单
     * @Date: 2023-09-08 23:28:45
    */
    void reminder(Long id);



    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

}
